package com.yidu.BusinessData.controller;

import com.yidu.BusinessData.entity.securityAccrued;
import com.yidu.BusinessData.service.SecurityAccruedService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author 周楠櫻木
 * @version 1.0
 * @date 2022/12/13
 */
@RestController
public class SecurityAccruedController {
    @Autowired
    private SecurityAccruedService securityAccruedService;


    @RequestMapping("/selectSecurityAccrued")
    public Map selectSecurityAccrued(int page, int row, String businessTime) {
        return securityAccruedService.selectSecurityAccrued(page, row, businessTime);
    }

    /**
     * 新增
     * @param
     * @return
     */
    @RequestMapping("/addSecurityAccrued")
    public int addSecurityAccrued(securityAccrued securityAccrued) {
        return securityAccruedService.addSecurityAccrued(securityAccrued);
    }

    /**
     * 删除
     * @param myArr 数组
     */
    @RequestMapping("/deleteSecurityAccrued")
    public void deleteExchangeRate(String myArr) {
        securityAccruedService.deleteSecurityAccrued(myArr);
    }

    /**
     * 修改
     * @param
     * @return
     */
    @RequestMapping("/updateSecurityAccrued")
    public String updateSecurityAccrued(securityAccrued securityAccrued) {
        System.out.println("========================="+securityAccrued.toString());
        return securityAccruedService.updateSecurityAccrued(securityAccrued);
    }

    /**
     * 两费删除
     * @param securityAccrued
     * @return
     */
    @RequestMapping("/deleteSecurityAccrueds")
    public int deleteSecurityAccrueds(securityAccrued securityAccrued){
        int i =  securityAccruedService.deleteSecurityAccrueds(securityAccrued);
        return i;
    }
}
